import Blender
import GameLogic

co = GameLogic.getCurrentController()
obj = co.getOwner()
sens = co.getSensor('touchSens')

hitList = sens.getHitObjectList()
endAct = co.getActuator('endAct')

print 'here!'

# If we touched a red bomb and its visible, die!
for item in hitList:
	print 'eval: ' + item.name
	if item.name.find('BombCubeRed') != -1:
		bomb = Blender.Object.Get(item.name[2:])
		print bomb.visible
		if bomb.visible:
			GameLogic.addActiveActuator(endAct, True)
